﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmRegistrarArea.aspx.cs" Inherits="SISLOG.Web.frmRegistrarArea" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <h1>DETALLE DE AREA</h1>
    <p>
        <asp:FormView ID="fvRegistrarArea" runat="server" 
            DataSourceID="ObjectDataSourceArea" DefaultMode="Edit" 
            oniteminserted="fvRegistrarArea_ItemInserted" 
            onitemupdated="fvRegistrarArea_ItemUpdated">
            <EditItemTemplate>
                IdArea:
                <asp:TextBox ID="IdAreaTextBox" runat="server" Text='<%# Bind("IdArea") %>' />
                <br />
                NombreArea:
                <asp:TextBox ID="NombreAreaTextBox" runat="server" 
                    Text='<%# Bind("NombreArea") %>' />
                <br />
                <asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True" 
                    CommandName="Update" Text="Actualizar" />
                <ajaxToolkit:ConfirmButtonExtender ID="UpdateButton_ConfirmButtonExtender" 
                    runat="server" ConfirmText="¡Area actualizado con exito!" Enabled="True" 
                    TargetControlID="UpdateButton">
                </ajaxToolkit:ConfirmButtonExtender>
                &nbsp;<asp:LinkButton ID="UpdateCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancelar" 
                    PostBackUrl="~/frmArea.aspx" />
                <ajaxToolkit:ConfirmButtonExtender ID="UpdateCancelButton_ConfirmButtonExtender" 
                    runat="server" ConfirmText="¿Deesa cancelar la acción?" 
                    TargetControlID="UpdateCancelButton">
                </ajaxToolkit:ConfirmButtonExtender>
            </EditItemTemplate>
            <InsertItemTemplate>
                IdArea:
                <asp:TextBox ID="IdAreaTextBox" runat="server" Text='<%# Bind("IdArea") %>' />
                <br />
                NombreArea:
                <asp:TextBox ID="NombreAreaTextBox" runat="server" 
                    Text='<%# Bind("NombreArea") %>' />
                <br />
                <asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True" 
                    CommandName="Insert" Text="Insertar" />
                <ajaxToolkit:ConfirmButtonExtender ID="InsertButton_ConfirmButtonExtender" 
                    runat="server" ConfirmText="¡Area registrada con exito!" 
                    TargetControlID="InsertButton">
                </ajaxToolkit:ConfirmButtonExtender>
                &nbsp;<asp:LinkButton ID="InsertCancelButton" runat="server" 
                    CausesValidation="False" CommandName="Cancel" Text="Cancelar" 
                    PostBackUrl="~/frmArea.aspx" />
                <ajaxToolkit:ConfirmButtonExtender ID="InsertCancelButton_ConfirmButtonExtender" 
                    runat="server" ConfirmText="¿Desa cancelar la accion?" 
                    TargetControlID="InsertCancelButton">
                </ajaxToolkit:ConfirmButtonExtender>
            </InsertItemTemplate>
            <ItemTemplate>
                IdArea:
                <asp:Label ID="IdAreaLabel" runat="server" Text='<%# Bind("IdArea") %>' />
                <br />
                NombreArea:
                <asp:Label ID="NombreAreaLabel" runat="server" 
                    Text='<%# Bind("NombreArea") %>' />
                <br />
                <asp:LinkButton ID="EditButton" runat="server" CausesValidation="False" 
                    CommandName="Edit" Text="Editar" />
                &nbsp;
            </ItemTemplate>
        </asp:FormView>
        <asp:ObjectDataSource ID="ObjectDataSourceArea" runat="server" 
            DataObjectTypeName="SISLOG.BusinessEntities.Area" InsertMethod="RegistrarArea" 
            onobjectcreating="ObjectDataSourceArea_ObjectCreating1" 
            SelectMethod="GetAllFromAreaByIdArea" TypeName="SISLOG.BusinessLogic.AreaBL" 
            UpdateMethod="RegistrarArea">
            <SelectParameters>
                <asp:QueryStringParameter Name="idArea" QueryStringField="idArea" 
                    Type="Int32" />
            </SelectParameters>
        </asp:ObjectDataSource>
    </p>
</asp:Content>
